<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v-model的基本使用</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    #app {
      text-align: center;
    }

    input {
      margin: 50px 0;
      padding: 4px 0;
      text-align: center;
      border: 1px solid transparent;
      border-bottom: 1px solid steelblue;
      outline: none;
      font-size: 18px;
    }
  </style>
</head>

<body>

  <div id="app">
    <!-- 1. v-model双向绑定，input内的value改变，Model中绑定变量也改变，反之Model中的变量一改变，input中的value也改变 -->
    <input type="text" v-model="message">
    <h3>{{ message }}</h3>
  </div>

  <script src="../../js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        message: 'hello'
      }
    })
  </script>
</body>

</html>